chore: pin react/react-dom to 18.3.1 for deterministic dedupe#488
Merged
Conversation
The docs workspace (@coreui/react-docs) depends on react@19, which yarn can
hoist to the repo root and split the library/react-dom onto duplicate nested
react@18 copies — exactly what broke coreui-react-pro's tests ("invalid hook
call"). coreui-react currently avoids this only by luck of the hoist order; a
resolutions pin makes a single react@18.3.1 instance deterministic across installs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
resolutionspin so the monorepo always installs a singlereact@18.3.1instance.The docs workspace (
@coreui/react-docs) depends onreact@^19.2.7. yarn can hoist react@19 to the repo root and push the library + react-dom onto their own nested react@18 copies — multiple React instances → "invalid hook call" (useRefon null) in jsdom tests. That is exactly what was failing ~144 test suites incoreui-react-pro(fixed there with the same pin).coreui-reacthappens to hoist react@18 today, so its tests pass — but only by luck of install order. This pin makes it deterministic.No behavior change; lib build + tests stay green (129 suites / 365 tests).